import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    
    {
      path: '/',
      name: 'Login',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/MainView',
      name: 'MainView',
      
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/MainView.vue'),
      children:[
        {
          path: '/TraceabilityView',
          name: 'TraceabilityView',
          component:  () => import('../views/TraceabilityManagement/TraceabilityView.vue'),
        },
        {
          path: '/BreedingEnterpriseView',
          name: 'BreedingEnterpriseView',
          component:  () => import('../views/TraceabilityManagement/BreedingEnterpriseView.vue'),
        },
        {
          path: '/BreedingEnterpriseForOneView',
          name: 'BreedingEnterpriseForOneView',
          component:  () => import('../views/TraceabilityManagement/BreedingEnterpriseForOneView.vue'),
        }
      ]
    },
  ],
})


export default router
